#pragma once
#include "XStormBase.h"

namespace Xts
{
	namespace IceRuntime
	{
		class XStormSubscriber : public XStormBase, public IceUtil::Shared
		{
		public:
			XStormSubscriber(const Ice::CommunicatorPtr& pIc, const Ice::LoggerPtr& pLogger, const Ice::ObjectAdapterPtr& pObjAdapter);
			~XStormSubscriber(void);

			bool SubscribeTopic(const ::std::string& topicName, const ::Ice::ObjectPtr& pSubServant,
				Ice::ObjectPrx& subscriberPrx);
			bool UnSubscribeTopic(const ::std::string& topicName, ::Ice::ObjectPrx& subscriberPrx);
			::std::vector<::std::string> GetExistTopicNames(void);

		protected:
			Ice::ObjectAdapterPtr x_pObjAdapter;
		};
		typedef ::IceUtil::Handle<XStormSubscriber> XStormSubscriberPtr;
	}
}


